Constraint Logic Programming for program analysis
نویسنده
چکیده
Constraint Logic Programming (CLP) has been traditionally applied to the modelling of complex problems, especially combinatorial problems, and to model knowledge bases. In this presentation, we focus on using CLP for program analysis and verification. First we consider the representation of program behavior: the rules and constraints of CLP provides for a natural specification of programs as a symbolic guarded transition system. The CLP execution model can then capture the symbolic traces of the underlying program, and these traces, in turn, divulge the properties that we seek. Secondly, we use the CLP formalism for the formal specification of complex properties of data structures. Here the CLP execution model can be used as a theorem-prover to dispense with the proof obligations arising from the program and its specifications. The traditional CLP execution model, however, is not automatically practical for these purposes. We shall present two refinements to CLP: one for reducing the number of symbolic traces that are needed to prove a property, and one to efficiently deal with data structure properties. Copyright c ©2008, Australian Computer Society, Inc. This paper appeared at the Thirty-First Australasian Computer Science Conference (ACSC2008), Wollongong, Australia. Conferences in Research and Practice in Information Technology (CRPIT), Vol. 74, Gillian Dobbie and Bernard Mans, Ed. Reproduction for academic, not-for profit purposes permitted provided this text is included.
منابع مشابه
Transient Analysis and Synthesis of Linear Circuits using Constraint Logic Programming
In this paper describes the design of a transient analysis program for linear circuits and its implementation in a Constraint Logic Programming language, CLP(R). The transient analysis program parses the input circuit description into a network graph, analyses its semantic correctness and then performs the transient analysis. The test results show that the program is at least 97% accurate when ...
متن کاملSlicing of Constraint Logic Programs
Abstract. Slicing is a program analysis technique originally developed for imperative languages. It facilitates understanding of data flow and debugging. This paper discusses slicing of Constraint Logic Programs. Constraint Logic Programming (CLP) is an emerging software technology with a growing number of applications. Data flow in constraint programs is not explicit, and for this reason the c...
متن کاملTowards Predicated WCET Analysis
In this paper, we propose the use of constraint logic programming as a way of modeling contextsensitive execution-times of program segments. The context-sensitive constraints are collected automatically through static analysis or measurements. We achieve considerable tightness in comparison to traditional calculation methods that exceeded 20% in some cases during evaluation. The use of constrai...
متن کاملStatic Analysis of CLP Programs over Numeric Domains
Constraint logic programming (CLP) is a generalization of the pure logic programming paradigm, having similar model-theoretic, fixpoint and operational semantics [9]. Since the basic operational step in program execution is a test for solvability of constraints in a given algebraic structure, CLP has in addition an algebraic semantics. CLP is then a general paradigm which may be instantiated on...
متن کاملTCHR: a framework for tabled CLP
Tabled Constraint Logic Programming is a powerful execution mechanism for dealing with Constraint Logic Programming without worrying about fixpoint computation. Various applications, e.g in the fields of program analysis and model checking, have been proposed. Unfortunately, a high-level system for developing new applications is lacking, and programmers are forced to resort to complicated ad ho...
متن کاملOn Termination of Constraint Logic Programs
This paper introduces a necessary and sufficient condition for termination of constraint logic programs. The method is based on assigning a dataflow graph to a program, whose nodes are the program points and whose arcs are abstractions of the rules of a transition system, describing the operational behaviour of constraint logic programs. Then termination is proven using a technique inspired by ...
متن کامل